package com.yan.demo.demo1;

/**
 * @author taoge
 * @Date 2024/8/8 9:22
 * @Description
 */
public class Account {
    private int money;

    public Account(int money) {
        this.money = money;
    }

    public Account() {
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Account account = (Account) o;

        return money == account.money;
    }

    @Override
    public int hashCode() {
        return money;
    }

    @Override
    public String toString() {
        return "Account{" +
                "money=" + money +
                '}';
    }
}
